home *** CD-ROM | disk | FTP | other *** search
-
- /*© Copyright 1988-1993 UserLand Software, Inc. All Rights Reserved.*/
-
- #include "iacinternal.h"
- #include "iacextras.h"
-
-
- Boolean IACpushlistparam (AEDescList * val, OSType keyword) {
-
- return (IACpushlistitem (IACglobals.event, val, keyword));
-
- } /*IACpushlistparam*/
-
-
- Boolean IACreturnlist (AEDescList *val) {
-
- return (IACpushlistitem (IACglobals.reply, val, keyDirectObject));
-
- } /*IACreturnlist*/
-
-
- Boolean IACgetlistparam (OSType keyword, AEDescList *val) {
-
- if (!IACgetlistitem (IACglobals.event, keyword, val)) {
-
- IACparamerror (IACglobals.errorcode, "\plist", keyword);
-
- return (false);
- }
-
- IACglobals.nextparamoptional = false; /*must be reset for each param*/
-
- return (true);
- } /*IACgetlistparam*/
-
-
- Boolean IACnewlist (AEDescList *list) {
-
- register OSErr ec;
-
- ec = AECreateList (NULL, (Size) 0, false, list);
-
- IACglobals.errorcode = ec;
-
- return (ec == noErr);
- } /*IACnewlist*/
-
-
- Boolean IACgetlistitem (AEDescList *list, long n, AEDescList *val) {
-
- register OSErr ec;
- DescType key;
- Size actualSize;
-
- if ((*list).descriptorType != typeAEList) {
-
- ec = AEGetKeyDesc (list, n, typeAEList, val);
-
- if (ec != errAEDescNotFound)
- goto done;
- }
-
- ec = AEGetNthDesc (list, n, typeAEList, &key, val);
-
- done:
-
- IACglobals.errorcode = ec;
-
- return (ec == noErr);
- } /*IACgetlistitem*/
-
-
- Boolean IACpushlistitem (AEDescList *list, AEDescList *x, long n) {
-
- register OSErr ec;
-
- if ((*list).descriptorType != typeAEList)
- ec = AEPutKeyDesc (list, n, x);
- else
- ec = AEPutDesc (list, n, x);
-
- IACglobals.errorcode = ec;
-
- AEDisposeDesc (x);
-
- (*x).descriptorType = typeNull;
-
- (*x).dataHandle = NULL;
-
- return (ec == noErr);
- } /*IACpushlistitem*/
-
-